package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Audit generated by hbm2java
 */
@Entity
@Table(name = "audit")
public class Audit implements java.io.Serializable {

	private Long id;
	private UserBaseInfo userBaseInfoByCreateUser;
	private UserBaseInfo userBaseInfoByAuditUser;
	private Integer auditType;
	private String auditDetail;
	private Date createDate;

	public Audit() {
	}

	public Audit(UserBaseInfo userBaseInfoByCreateUser,
			UserBaseInfo userBaseInfoByAuditUser, Integer auditType,
			String auditDetail, Date createDate) {
		this.userBaseInfoByCreateUser = userBaseInfoByCreateUser;
		this.userBaseInfoByAuditUser = userBaseInfoByAuditUser;
		this.auditType = auditType;
		this.auditDetail = auditDetail;
		this.createDate = createDate;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CREATE_USER")
	public UserBaseInfo getUserBaseInfoByCreateUser() {
		return this.userBaseInfoByCreateUser;
	}

	public void setUserBaseInfoByCreateUser(
			UserBaseInfo userBaseInfoByCreateUser) {
		this.userBaseInfoByCreateUser = userBaseInfoByCreateUser;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AUDIT_USER")
	public UserBaseInfo getUserBaseInfoByAuditUser() {
		return this.userBaseInfoByAuditUser;
	}

	public void setUserBaseInfoByAuditUser(UserBaseInfo userBaseInfoByAuditUser) {
		this.userBaseInfoByAuditUser = userBaseInfoByAuditUser;
	}

	@Column(name = "AUDIT_TYPE")
	public Integer getAuditType() {
		return this.auditType;
	}

	public void setAuditType(Integer auditType) {
		this.auditType = auditType;
	}

	@Column(name = "AUDIT_DETAIL")
	public String getAuditDetail() {
		return this.auditDetail;
	}

	public void setAuditDetail(String auditDetail) {
		this.auditDetail = auditDetail;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATE", length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

}
